1. Field of the Invention
The present invention relates to a communication apparatus, a timer control apparatus, and a timer control method.
2. Description of the Related Art
Network timer management has conventionally been performed as part of network protocol processing. In network timer management, plural types of timers, for example, an ACK timer, a continuous timer or the like, are the target of management for each established connection. The management-target timer is started by a processor, for example, a CPU, at necessary timing in the network protocol processing. When the management-target timer times out, predetermined processing is performed in accordance with the connection and the type of timer. If a predetermined event occurs before the time-out and the timer becomes unnecessary, stop processing is performed with respect to the timer. An example of implementing the aforementioned network timer control is seen in the timer management technique using software (U.S. Pat. No. 5,577,237).
According to the recently adopted timer management method, part of the network timer processing that should be performed by a processor is performed by hardware in place of the processor. According to this method, hardware performs the following two processing. More specifically, two processing executed by hardware are:
(1) registration, revision, and deletion of timer information in a storage device in a case where the timer is started or stopped; and
(2) confirmation of whether or not the timer in operation has been timed out in a case where an interruption occurs in a cycle timer.
Hereinafter, the hardware apparatus which executes the aforementioned processing (1) and (2) in place of a processor will be referred to as a network timer management apparatus.
The network timer management apparatus performs the aforementioned processing (1) in a case where a processor makes a timer-start or timer-stop request. More specifically, it is executed in the following manner. First, the processor makes a timer-start request along with information regarding the connection type, timer type, time-out time and the like, to the network timer management apparatus. The network management apparatus which has received the timer-start request registers the timer information in a storage device, and sets a start-up flag indicating that the timer has been started (revision). Meanwhile, in a case where the processor makes a timer-stop request to the network timer management apparatus, timer information of the target timer is searched in the storage device, and the corresponding start-up flag is invalidated (revision) or deleted.
The network timer management apparatus performs the aforementioned processing (2) in a case where it receives an interrupt notification from a cycle timer. More specifically, it is executed in the following manner. When a notification is received from the cycle timer, the network timer management apparatus reads timer information in the storage device and determines whether or not there is a timer in which a start-up flag has been set and the set time has run out. If such timer is detected, the network timer management apparatus sends an interrupt signal to the processor to notify the time-out.
In the above-described network timer management apparatus, the storage device where timer information is stored is generally a shared memory of the processor and the network timer management apparatus. Therefore, depending on the amount of accesses to the shared memory, system bus competition and access competition to the shared memory occur, raising concerns about reduced performance of the entire system. There is also a concern that increased memory accesses cause increased power consumption.